﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class D05_Vector3_3 : MonoBehaviour
{
    //AB的位置分别代表两个向量
    public Transform cubeA, cubeB;

    private void Update()
    {
        Debug.DrawLine(Vector3.zero, cubeA.position, Color.red);
        Debug.DrawLine(Vector3.zero, cubeB.position, Color.red);

        cubeA.position = Vector3.RotateTowards(cubeA.position, cubeB.position, 0 * Time.deltaTime, 1 * Time.deltaTime);
    }
}